package com.atlin.provider;


import com.atlin.nrpc.core.RpcApplication;
import com.atlin.nrpc.core.registry.LocalRegistry;
import com.atlin.nrpc.core.service.VertxHttpServer;
import com.atlin.service.UserInfoService;

/**
 * 简易服务提供着示例
 */
public class EasyProviderExample {
    public static void main(String[] args) {

        // RPC 框架初始化
        RpcApplication.init();

        // 注册服务
        LocalRegistry.register(UserInfoService.class.getName(), UserInfoServiceImpl.class);

        VertxHttpServer server = new VertxHttpServer();
        server.doStart(RpcApplication.getRpcConfig().getServerPort());
    }
}
